<!doctype html>
<html lang="en">
<head>
    <title>Code coverage report for src/views/major/majorInfo.vue</title>
    <meta charset="utf-8" />
    <link rel="stylesheet" href="..\..\..\prettify.css" />
    <link rel="stylesheet" href="..\..\..\base.css" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type='text/css'>
        .coverage-summary .sorter {
            background-image: url(..\..\..\sort-arrow-sprite.png);
        }
    </style>
</head>
<body>
<div class='wrapper'>
  <div class='pad1'>
    <h1>
      <a href="..\..\..\index.html">All files</a> / <a href="index.html">src/views/major</a> majorInfo.vue
    </h1>
    <div class='clearfix'>
    </div>
  </div>
  <div class='status-line low'></div>
<pre><table class="coverage">
<tr><td class="line-count quiet">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">&lt;template&gt;
    &lt;div class="box"&gt;
        &lt;el-card&gt;
            &lt;div class="btn"&gt;
                &lt;el-button
                    v-for="(item, i) in roles"
                    :key="i"
                    type="primary"
                    :icon="item.icon"
                    circle
                    @click="btnBox(item.type)"
                &gt;&lt;/el-button&gt;
            &lt;/div&gt;
            &lt;div class="list"&gt;
                &lt;el-table
                    ref="singleTable"
                    :data="tableData"
                    highlight-current-row
                    @current-change="handleCurrentChange"
                    style="width: 100%"
                &gt;
                    &lt;el-table-column type="index" width="50"&gt; &lt;/el-table-column&gt;
                    &lt;el-table-column property="className" label="班级名称"&gt;
                    &lt;/el-table-column&gt;
                    &lt;el-table-column property="classMajor" label="专业名称"&gt;
                    &lt;/el-table-column&gt;
                    &lt;el-table-column property="classNum" label="人数"&gt;
                    &lt;/el-table-column&gt;
                    &lt;el-table-column property="classInstructo" label="辅导员"&gt;
                    &lt;/el-table-column&gt;
                    &lt;el-table-column property="classStareDate" label="开班日期"&gt;
                    &lt;/el-table-column&gt;
                    &lt;el-table-column property="classLength" label="学制"&gt;
                        &lt;template slot-scope="scope"&gt;
                            {{ scope.row.classLength == 0 ? "三年" : "四年" }}
                        &lt;/template&gt;
                    &lt;/el-table-column&gt;
                    &lt;el-table-column property="classLength" label="状态"&gt;
                        &lt;template slot-scope="scope"&gt;
                            {{ scope.row.classLength == 0 ? "未开班" : "开班" }}
                        &lt;/template&gt;
                    &lt;/el-table-column&gt;
                &lt;/el-table&gt;
            &lt;/div&gt;
        &lt;/el-card&gt;
        &lt;addTeacherInfo
            @show="isShow = false"
            :tracherInfo="tracherInfo"
            :isShow="isShow"
            @refreshBox="getClassList"
        &gt;
        &lt;/addTeacherInfo&gt;
    &lt;/div&gt;
&lt;/template&gt;
&nbsp;
&lt;script&gt;
<span class="cstat-no" title="statement not covered" >import { getTeacherList, delTeacherInfo } from "../../api/user";</span>
<span class="cstat-no" title="statement not covered" >import { getClassList } from "../../api/classApi";</span>
// getScoreList
<span class="cstat-no" title="statement not covered" >import addTeacherInfo from "../../components/user/addTeacherInfo.vue";</span>
&nbsp;
export default {
<span class="fstat-no" title="function not covered" >    data() {</span>
<span class="cstat-no" title="statement not covered" >        return {</span>
            roles: [
                { type: "add", icon: "el-icon-plus" },
                { type: "update", icon: "el-icon-edit-outline" },
                { type: "del", icon: "el-icon-minus" },
            ],
            tableData: [],
            currentRow: null,
            tracherInfo: null,
            isShow: false,
        };
    },
    components: {
        addTeacherInfo,
    },
&nbsp;
<span class="fstat-no" title="function not covered" >    created() {</span>
        // this.list  =  this.list.map(i=&gt;i.setData={isChecked:false,showAgree:false})
<span class="cstat-no" title="statement not covered" >        this.getClassList();</span>
    },
&nbsp;
    methods: {
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >        btnBox(t) {</span></span>
<span class="cstat-no" title="statement not covered" >            switch (t) {</span>
                case "add":
<span class="cstat-no" title="statement not covered" >                    this.isShow = true;</span>
<span class="cstat-no" title="statement not covered" >                    this.tracherInfo = null;</span>
<span class="cstat-no" title="statement not covered" >                    return;</span>
                case "update":
<span class="cstat-no" title="statement not covered" >                    if (this.currentRow != null) {</span>
<span class="cstat-no" title="statement not covered" >                        this.isShow = true;</span>
<span class="cstat-no" title="statement not covered" >                        this.tracherInfo = JSON.parse(</span>
                            JSON.stringify(this.currentRow)
                        );
                    } else {
<span class="cstat-no" title="statement not covered" >                        this.$message("请选中数据");</span>
                    }
<span class="cstat-no" title="statement not covered" >                    return;</span>
                case "del":
<span class="cstat-no" title="statement not covered" >                    if (this.currentRow.id == undefined) {</span>
<span class="cstat-no" title="statement not covered" >                        this.$message({</span>
                            type: "info",
                            message: "按钮不可删除",
                        });
<span class="cstat-no" title="statement not covered" >                        return;</span>
                    }
<span class="cstat-no" title="statement not covered" >                    if (this.currentRow != null) {</span>
<span class="cstat-no" title="statement not covered" >                        this.$confirm(</span>
                            "此操作将永久删除该数据, 是否继续?",
                            "提示",
<span class="fstat-no" title="function not covered" >                            {</span>
                                confirmButtonText: "确定",
                                cancelButtonText: "取消",
                                type: "warning",
                            }
                        )
                            .then(() =&gt; {
<span class="cstat-no" title="statement not covered" >                                const loading = this.$loading({</span>
                                    lock: true,
                                    text: "Loading",
                                    spinner: "el-icon-loading",
                                    background: "rgba(0, 0, 0, 0.7)",
                                });
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >                                delTeacherInfo(this.currentRow.id).then(</span></span>
                                    (res) =&gt; {
<span class="cstat-no" title="statement not covered" >                                        loading.close();</span>
<span class="cstat-no" title="statement not covered" >                                        console.log("del", res);</span>
<span class="cstat-no" title="statement not covered" >                                        this.$message({</span>
                                            type: "success",
                                            message: "删除成功!",
                                        });
                                    }
                                );
<span class="fstat-no" title="function not covered" >                            })</span>
                            .catch(() =&gt; {
<span class="cstat-no" title="statement not covered" >                                this.$message({</span>
                                    type: "info",
                                    message: "已取消删除",
                                });
                            });
                    } else {
<span class="cstat-no" title="statement not covered" >                        this.$message("请选中数据");</span>
                    }
<span class="cstat-no" title="statement not covered" >                    return;</span>
            }
        },
<span class="fstat-no" title="function not covered" >        handleCurrentChange(val) {</span>
<span class="cstat-no" title="statement not covered" >            this.currentRow = val;</span>
        },
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >        getClassList() {</span></span>
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >            getClassList().then((res) =&gt; {</span></span>
<span class="cstat-no" title="statement not covered" >                this.tableData = res.data.list;</span>
            });
        },
    },
    computed: {},
    filters: {
<span class="fstat-no" title="function not covered" >        getStatus(n) {</span>
<span class="cstat-no" title="statement not covered" >            if (n == 0) return "关闭";</span>
            else return "开启";
        },
<span class="fstat-no" title="function not covered" >        courseDateFun(n) {</span>
<span class="cstat-no" title="statement not covered" >            switch (n) {</span>
                case "1":
<span class="cstat-no" title="statement not covered" >                    return "大一上";</span>
                case "2":
<span class="cstat-no" title="statement not covered" >                    return "大一下";</span>
                case "3":
<span class="cstat-no" title="statement not covered" >                    return "大二上";</span>
                case "4":
<span class="cstat-no" title="statement not covered" >                    return "大二下";</span>
                case "5":
<span class="cstat-no" title="statement not covered" >                    return "大三上";</span>
                case "6":
<span class="cstat-no" title="statement not covered" >                    return "大三下";</span>
                case "7":
<span class="cstat-no" title="statement not covered" >                    return "大四上";</span>
                case "8":
<span class="cstat-no" title="statement not covered" >                    return "大四下";</span>
            }
        },
    },
};
&lt;/script&gt;
&nbsp;
&lt;style lang="scss" scope&gt;
.box {
    text-align: left;
    margin: 20px 0;
    flex: 1;
&nbsp;
    .el-card {
        height: 100%;
    }
}
&lt;/style&gt;</pre></td></tr>
</table></pre>
<div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
  Code coverage
  generated by <a href="https://istanbul.js.org/" target="_blank">istanbul</a> at Wed Dec 14 2022 21:15:29 GMT+0800 (GMT+08:00)
</div>
</div>
<script src="..\..\..\prettify.js"></script>
<script>
window.onload = function () {
        if (typeof prettyPrint === 'function') {
            prettyPrint();
        }
};
</script>
<script src="..\..\..\sorter.js"></script>
</body>
</html>
